﻿<table class="unit-table order-item">
    <thead>
        <tr>
            <th>@T(Res.In("Common").Of("Vocab").Name("SKU"))</th>
            <th>@T(Res.Name("Quantity"))</th>
            <th>@T(Res.Name("Price"))</th>
            <th>@T(Res.Name("Discount"))</th>
            <th>@T(Res.Name("Tax"))</th>
            <th>@T(Res.Name("Total"))</th>
        </tr>
    </thead>
    <tbody>
    @if((Model as IEnumerable<dynamic>).Any())
    {
        foreach(var i in Model)
        {
            <tr class="unit order-item">
                <td>
                    <a href="@Url.Action(Loc.Act("GoTo").Ctrl("Item").Area("Store").Set(new
                    {
                        sku = JDM.String(i.SKU)
                    }).Localized())">@JDM.String(i.SKU)</a>
                </td>
                <td>@Svc.Numeric((decimal)JDM.Decimal(i.Quantity))</td>
                <td>@Svc.Price((decimal)JDM.Decimal(i.Price))</td>
                <td>@Svc.Price((decimal)JDM.Decimal(i.DiscountAmount))</td>
                <td>@Svc.Price((decimal)JDM.Decimal(i.TaxAmount))</td>
                <td>@Svc.Price((decimal)JDM.Decimal(i.Total))</td>
            </tr>
        }
    }
    else
    {
        <tr>
            <td class="empty" colspan="4"><span>@T(Res.In("Common").Of("Expr").Name("NoData"))</span></td>
        </tr>
    }
    </tbody>
</table>